<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <meta charset="utf-8">
    <title>完善个人资料</title>
    <mystyle>
    <link href="/public/css/personalReference.css" rel="stylesheet" type="text/css"/>
    </mystyle>
</head>
<body>
<form:form commandName="usersInfoDTO" enctype="multipart/form-data" action="/front/user_info/save">
    <div class="formMain">
        <div class="mainTop">
            <div style="display: table-cell;vertical-align: middle;">
            <c:choose>
                <c:when test="${'' eq usersInfoDTO.imageGuid}">
                    <img src="/public/img/head-portrait.png" id="headSculpture" width="185px" height="185px">
                </c:when>
                <c:otherwise>
                    <img src="/public/image/${usersInfoDTO.imageGuid}" id="headSculpture" width="185px" height="185px">
                </c:otherwise>
            </c:choose>
                <input type="file" accept="image/*" name="usersInfoImage" id="usersInfoImage" onchange="preImg(this.id,'headSculpture');">
            <p style="font-size: 18px;">完善会员资料<i class="iconfont">&#xe605;</i></p>
            </div>
        </div>
        <div class="mainBottom">
            <ul>
                <li>
                    <i class="iconImg iconPhone"></i>
                    <form:input path="phoneNum" readonly="true" disabled="true" id="phoneNum" />
                </li>
                <li>
                    <i class="iconImg iconEmail"></i>
                    <form:input path="email" id="email" onblur="validEmail()"/>
                </li>
                <li>
                    <i class="iconImg iconUsername"></i>
                    <form:input path="username" id="username" onblur="validUsername()"/>
                </li>
                <li><i class="iconImg iconRealName"></i>
                    <form:input path="realName" id="realName" onblur="validRealName()"/>
                </li>
                <li>
                    <i class="iconImg iconGender"></i>
                    <div class="radioBg">
                        <form:radiobutton label="男" path="gender" value="male" />
                        <form:radiobutton label="女" path="gender" value="female"/>
                    </div>
                </li>
                <li>
                    <i class="iconImg iconWdate"></i>
                    <form:input class="Wdate" name="birthday" onFocus="WdatePicker({lang:'zh-cn'})" path="birthday"/>
                </li>
                <li><i class="iconImg iconIDCard"></i>
                    <form:input path="IDCard" id="IDCard" onblur="validIdCard()"/>
                </li>
                <li><i class="iconImg iconPosition"></i>
                    <form:input path="position" id="position"/>
                </li>
                <li style="border: 0px;">
                    <i class="iconImg iconMaps"></i>
                    <div style="width: 540px">
                        <form:select path="province" id="province" onchange="findCity()">
                            <form:option value="noselect">请选择</form:option>
                            <c:forEach items="${usersInfoDTO.provinces}" var="provinces">
                                <form:option value="${provinces.id}">${provinces.provinceName}</form:option>
                            </c:forEach>
                        </form:select>
                        <form:select path="city" id="city" onchange="findDistrict()">
                            <form:option value="noselect">请选择</form:option>
                            <c:forEach items="${usersInfoDTO.cities}" var="cities">
                                <form:option value="${cities.id}">${cities.cityName}</form:option>
                            </c:forEach>
                        </form:select>
                        <form:select class="second" path="district" id="district">
                            <form:option value="noselect">请选择</form:option>
                            <c:forEach items="${usersInfoDTO.districts}" var="districts">
                                <form:option value="${districts.id}">${districts.districtName}</form:option>
                            </c:forEach>
                        </form:select>
                        <form:input path="area"/>
                    </div>
                </li>
                <li style="padding-top: 38px;border-bottom: 0px;">
                    <input type="submit" value="保存">
                    <a href="JavaScript:void(0);" class="clause">同意服务条款</a><br>
                </li>
            </ul>
        </div>
    </div>
</form:form>
<myscript>
    <script src="/static/datepicker/WdatePicker.js"></script>
    <script src="/public/js/myHouse.js"></script>
</myscript>
</body>
</html>
